{extend name="main"}

{block name="button"}
<!--{if auth("backup")}-->
<button data-queue='{:url("backup")}' data-table-id="UserData" data-confirm="确定要创建数据备份的后台任务？" class='layui-btn layui-btn-sm layui-btn-primary'>新建备份</button>
<!--{/if}-->
{/block}

{block name="content"}
<div class="layui-tab layui-tab-card think-bg-white">
    <div class="layui-tab-content">
        <table class="layui-table margin-top-10" lay-skin="line">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='text-left nowrap'>文件名</th>
                <th class='text-left nowrap'>大小</th>
                <th class='text-left nowrap'>备份时间</th>
                <th></th>
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='nowrap'>
                    {$vo.name}
                </td>
                <td class='nowrap'>
                    {$vo.size}
                </td>
                <td class='nowrap'>
                    {$vo.time_text}
                </td>
                <td class='nowrap sub-strong-blue'>
                    <!--{if auth("remove")}-->
                    <a class="layui-btn layui-btn-xs layui-btn-danger" data-action="{:url('remove')}" data-confirm="确定要删除文件吗？" data-value="code#{$vo.path};deleted#1">删 除</a>
                    <!--{/if}-->
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
        {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
    </div>
</div>
{/block}